package com.specialprice.model;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Product implements Serializable {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -2425298785339399774L;

	public static final String SIMPLE_NAME = Product.class.getSimpleName();

	@PrimaryKey
	private Long id;

	@Persistent
	private String title;

	@Persistent
	private String imgUrl;

	@Persistent
	private double price;

	@Persistent
	private String promotion;

	@Persistent
	private Date timestamp;

	@Persistent
	private Date lastPriceTimestamp;

	public Long getId() {
		return id;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public Date getLastPriceTimestamp() {
		return lastPriceTimestamp;
	}

	public double getPrice() {
		return price;
	}

	public String getPromotion() {
		return promotion;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public String getTitle() {
		return title;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public void setLastPriceTimestamp(Date lastPriceTimestamp) {
		this.lastPriceTimestamp = lastPriceTimestamp;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public void setPromotion(String promotion) {
		this.promotion = promotion;
	}

	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}
